# -*- coding: utf-8 -*-
# @Time    : 2019/7/22 21:10
# @Author  : Weymouth
# @Email   : 261229090@qq.com
# @File    : login_while.py
# @Software: PyCharm
# ---------------------------------------------------

# counter = 0
# while True:
#     if counter > 2**32:
#         break
#     counter += 1

_user = "wey"
_password = "abc123"

counter = 0

while counter < 3:
    username = input("username:")
    password = input("password:")
    if username == _user and password == _password:
        print("welcome %s login..." % _user)
        break
    elif counter < 2:
        print("Invalid username or password !")
    else:
        print("user is locked !")
    counter += 1

    if counter == 3:
        keep_going_choice = input("还想完么？[y/n]")
        if keep_going_choice == "y":
            counter = 0

else:
    print(" Please call 123456 !")